import { createApp } from 'vue'

import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'

import piniaPluginPersistedState from 'pinia-plugin-persistedstate'
//引入初始化样式文件
import '@/styles/common.scss'

// 定义懒加载插件

import { directivePlugin } from '@/directives'
import { componentPlugin } from '@/components'


const app = createApp(App)
const pinia = createPinia()

app.use(pinia)
pinia.use(piniaPluginPersistedState)

app.use(router)
app.use(directivePlugin)
app.use(componentPlugin)
app.mount('#app')